package com.travel.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.travel.domain.entity.ScenicIntro;
import com.travel.service.ScenicIntroService;
import com.travel.mapper.ScenicIntroMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 李健波
* @description 针对表【scenic_intro】的数据库操作Service实现
* @createDate 2024-11-20 17:04:29
*/
@Service
public class ScenicIntroServiceImpl extends ServiceImpl<ScenicIntroMapper, ScenicIntro>
    implements ScenicIntroService{

    @Autowired
    private ScenicIntroMapper scenarioIntroMapper;

    /**
     * 查询所有景点
     * @return List<Scenic>
     */
    public List<ScenicIntro> getAllScenic() {
        return scenarioIntroMapper.selectList(null);
    }


    /**
     * 根据 ID 查询景点
     * @param id 景点 ID
     * @return 景点信息
     */
    public ScenicIntro getScenicById(Long id) {
        return scenarioIntroMapper.selectById(id);
    }
}




